<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
//引入DB库
use Illuminate\Support\Facades\DB;
class Test extends Model
{
    //查询方法
    public function test_query($table,$where)
    {
    	$users = DB::table($table)->where($where)->first();
    	$obj_arr=json_decode(json_encode($users),true);
    	return $obj_arr;
    }
}
